# -*- coding:UTF-8 -*-

"""
辅助程序用于清空数据库
"""

import pymongo

class db_class():
    def __init__(self): #初始化数据库，后面的函数名称就是函数功效。。
        self.conn = pymongo.MongoClient('localhost',27017)
        self.user_db = self.conn.user
        self.key_db = self.conn.user_key
    def clear(self):
        self.user_db.user.remove()
        self.key_db.user.remove()

if __name__ == '__main__':
    db = db_class()
    db.clear()